mce: Enhance the vmce injection check logic
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 15 Jun 2010 10:34:13 +0000 (11:34 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 15 Jun 2010 10:34:13 +0000 (11:34 +0100)
commitcfd524febf8203247232cb03ea4b2b3674eb6b8d
tree0760acef6cabe955f562fc66fdec294b7a215312
parent5536c6247b0bb424535e31d125aeafd7e93e226a
mce: Enhance the vmce injection check logic

Currently we will not inject vMCE if guest has different mca control
register setup.

This is not enough, we need consider more. If guest has different
family/model, we should not inject guest, because the MCA error code
include model specific information. If guest has not enabled MCE
(i.e. CR4.X86_CR4_MCE is clear), we should not inject vMCE.

One thing need notice. In the memory error handler, we didn't kill the
guest if vMCE is not ready, instead, we will simply ignore the
vMCE. In native, system will reboot if MCE in CR4 is not enabled. We
need contain guest access to the broken memory through eithe software
or hardware method.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
xen/arch/x86/cpu/mcheck/mce.h
xen/arch/x86/cpu/mcheck/mce_intel.c
xen/arch/x86/cpu/mcheck/vmce.c